package cn.funnyxb.powerremember.pullMsg;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.content.Context;
import android.os.AsyncTask;
import android.webkit.WebView;
import cn.funnyxb.powerremember.LogoActivity;
import cn.funnyxb.powerremember.pullMsg.beans.VersionInfo;
import cn.funnyxb.tools.appFrame.App;
import cn.funnyxb.tools.appFrame.activityFrame.AbstractProccessor;
import cn.funnyxb.tools.appFrame.activityFrame.ActivitysHolder;
import cn.funnyxb.tools.appFrame.debugTool.Debuger;

public class PullTask4Version extends AsyncTask<Void, Void, VersionInfo>
{
  private Context context;
  private AbstractProccessor proccessor;

  public PullTask4Version(Context paramContext, AbstractProccessor paramAbstractProccessor)
  {
    this.context = paramContext;
    this.proccessor = paramAbstractProccessor;
  }

  private void log(String paramString)
  {
    Debuger.log("pullVersion", paramString);
  }

  private void notifyUpdate(VersionInfo paramVersionInfo)
  {
    Activity localActivity = App.getApp().getActivitysHolder().getCurrentAcitivity();
    String str = paramVersionInfo.getDownUrl();
    boolean bool1 = localActivity instanceof LogoActivity;
    boolean bool2 = paramVersionInfo.isMustDown();
    if (bool1)
      ((LogoActivity)localActivity).notifyShowVersionDialog(paramVersionInfo);
    log("pull,current=" + localActivity + ",isFinishing=" + localActivity.isFinishing() + ", isRestricted=" + localActivity.isRestricted() + ",hasfocus=" + localActivity.hasWindowFocus());
    if ((paramVersionInfo == null) || (localActivity.isFinishing()) || (localActivity.isRestricted()));
    while (true)
    {
      return;
      WebView localWebView = new WebView(localActivity);
      localWebView.loadDataWithBaseURL(null, paramVersionInfo.getVersionInfo_html(), "text/html", "utf-8", null);
      new AlertDialog.Builder(localActivity).setTitle(paramVersionInfo.getVersionTitle()).setView(localWebView).setPositiveButton(2131034135, new 1(this, str, localActivity)).setNegativeButton(2131034134, new 2(this, bool2, bool1, localActivity)).setCancelable(false).create().show();
    }
  }

  private void turn2PullWebMsg()
  {
    new PullTask4Webmsg(this.context, this.proccessor).execute(new Void[0]);
  }

  protected VersionInfo doInBackground(Void[] paramArrayOfVoid)
  {
    this.proccessor.regAsyncTask(this);
    VersionInfo localVersionInfo = new ServerMsger(this.context).getNewestVersionInfo();
    log("vi=" + localVersionInfo);
    return localVersionInfo;
  }

  // ERROR //
  protected void onPostExecute(VersionInfo paramVersionInfo)
  {
    // Byte code:
    //   0: aload_0
    //   1: aload_1
    //   2: invokespecial 203	android/os/AsyncTask:onPostExecute	(Ljava/lang/Object;)V
    //   5: aload_1
    //   6: ifnonnull +8 -> 14
    //   9: aload_0
    //   10: invokespecial 23	cn/funnyxb/powerremember/pullMsg/PullTask4Version:turn2PullWebMsg	()V
    //   13: return
    //   14: aload_0
    //   15: new 67	java/lang/StringBuilder
    //   18: dup
    //   19: ldc 205
    //   21: invokespecial 71	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
    //   24: aload_1
    //   25: invokevirtual 209	cn/funnyxb/powerremember/pullMsg/beans/VersionInfo:getVersionCode	()I
    //   28: invokevirtual 212	java/lang/StringBuilder:append	(I)Ljava/lang/StringBuilder;
    //   31: ldc 214
    //   33: invokevirtual 80	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   36: aload_0
    //   37: getfield 16	cn/funnyxb/powerremember/pullMsg/PullTask4Version:context	Landroid/content/Context;
    //   40: invokevirtual 220	android/content/Context:getPackageManager	()Landroid/content/pm/PackageManager;
    //   43: aload_0
    //   44: getfield 16	cn/funnyxb/powerremember/pullMsg/PullTask4Version:context	Landroid/content/Context;
    //   47: invokevirtual 223	android/content/Context:getPackageName	()Ljava/lang/String;
    //   50: iconst_1
    //   51: invokevirtual 229	android/content/pm/PackageManager:getPackageInfo	(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
    //   54: getfield 235	android/content/pm/PackageInfo:versionCode	I
    //   57: invokevirtual 212	java/lang/StringBuilder:append	(I)Ljava/lang/StringBuilder;
    //   60: invokevirtual 101	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   63: invokespecial 103	cn/funnyxb/powerremember/pullMsg/PullTask4Version:log	(Ljava/lang/String;)V
    //   66: aload_1
    //   67: invokevirtual 209	cn/funnyxb/powerremember/pullMsg/beans/VersionInfo:getVersionCode	()I
    //   70: aload_0
    //   71: getfield 16	cn/funnyxb/powerremember/pullMsg/PullTask4Version:context	Landroid/content/Context;
    //   74: invokevirtual 220	android/content/Context:getPackageManager	()Landroid/content/pm/PackageManager;
    //   77: aload_0
    //   78: getfield 16	cn/funnyxb/powerremember/pullMsg/PullTask4Version:context	Landroid/content/Context;
    //   81: invokevirtual 223	android/content/Context:getPackageName	()Ljava/lang/String;
    //   84: iconst_1
    //   85: invokevirtual 229	android/content/pm/PackageManager:getPackageInfo	(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
    //   88: getfield 235	android/content/pm/PackageInfo:versionCode	I
    //   91: if_icmple +19 -> 110
    //   94: aload_0
    //   95: aload_1
    //   96: invokespecial 237	cn/funnyxb/powerremember/pullMsg/PullTask4Version:notifyUpdate	(Lcn/funnyxb/powerremember/pullMsg/beans/VersionInfo;)V
    //   99: aload_0
    //   100: getfield 18	cn/funnyxb/powerremember/pullMsg/PullTask4Version:proccessor	Lcn/funnyxb/tools/appFrame/activityFrame/AbstractProccessor;
    //   103: aload_0
    //   104: invokevirtual 240	cn/funnyxb/tools/appFrame/activityFrame/AbstractProccessor:unRegAsyncTask	(Landroid/os/AsyncTask;)V
    //   107: goto -94 -> 13
    //   110: aload_0
    //   111: invokespecial 23	cn/funnyxb/powerremember/pullMsg/PullTask4Version:turn2PullWebMsg	()V
    //   114: goto -15 -> 99
    //   117: astore_3
    //   118: aload_0
    //   119: invokespecial 23	cn/funnyxb/powerremember/pullMsg/PullTask4Version:turn2PullWebMsg	()V
    //   122: aload_0
    //   123: getfield 18	cn/funnyxb/powerremember/pullMsg/PullTask4Version:proccessor	Lcn/funnyxb/tools/appFrame/activityFrame/AbstractProccessor;
    //   126: aload_0
    //   127: invokevirtual 240	cn/funnyxb/tools/appFrame/activityFrame/AbstractProccessor:unRegAsyncTask	(Landroid/os/AsyncTask;)V
    //   130: goto -117 -> 13
    //   133: astore_2
    //   134: aload_0
    //   135: getfield 18	cn/funnyxb/powerremember/pullMsg/PullTask4Version:proccessor	Lcn/funnyxb/tools/appFrame/activityFrame/AbstractProccessor;
    //   138: aload_0
    //   139: invokevirtual 240	cn/funnyxb/tools/appFrame/activityFrame/AbstractProccessor:unRegAsyncTask	(Landroid/os/AsyncTask;)V
    //   142: aload_2
    //   143: athrow
    //
    // Exception table:
    //   from	to	target	type
    //   14	99	117	android/content/pm/PackageManager$NameNotFoundException
    //   110	114	117	android/content/pm/PackageManager$NameNotFoundException
    //   14	99	133	finally
    //   110	114	133	finally
    //   118	122	133	finally
  }
}

/* Location:           E:\Desktop\复件 classes_dex2jar.jar
 * Qualified Name:     cn.funnyxb.powerremember.pullMsg.PullTask4Version
 * JD-Core Version:    0.5.3
 */